import Vue from 'vue'
import Vuex from 'vuex'

import createPersistedState from "vuex-persistedstate"



Vue.use(Vuex)

const store = new Vuex.Store({
  plugins: [createPersistedState()],
  state: {
    appphone:null,
    userinfo:'',
    cityinfo:null,
  },
  mutations: {
    changeAppPhone(state,payload){
      state.appphone = payload
    },
    changeUserInfo(state,payload){
      state.userinfo = {...state.userinfo,...payload}
    },
    uploadAction(state){
      state.userinfo = null
    },
    changeCityInfo(state,payload){
      state.cityinfo = payload
    }
  },
  actions: {
  },
  modules: {
  }
})
export default store
